<?php 
	list($width, $height) = explode('x', $thumb);
?>
<div class="widget ad_widget fader_ad_widget" id="<?php echo $id ?>" style="width:<?php echo $width?>px;height:<?php echo $height?>px;">
<?php
	if(!empty($title)){
		echo CHtml::tag('h5', array(), $title);
	}
?>
	<ul>
<?php 
	foreach ($items as $item){
?>
		<li>
			<a href="<?php echo $item['url']?>" target="<?php echo $item['target']?>">
				<img src="<?php echo CommonHelper::get_thumb($item['picture'], $thumb)?>" title="<?php echo  $item['title']?>"/>
			</a>
		</li>
<?php 
	}
?>
	</ul>
	<div class="ad_nav">
	<?php 
	foreach ($items as $index=>$item){
// 		echo CHtml::tag('label', array(), $item['title']);
		echo CHtml::tag('span', array(), $index + 1);
	}
	?>
	</div>
</div>
<?php 
Yii::app()->clientScript->registerScript($id, '$("#' . $id . '").fade_ad();');
?>